import Vue from 'vue'
import App from './App.vue'
import router from "./router";
import store from '@/store'
//三级联动组件
import TypeNav from './components/TypeNav'
//第一个参数：全局组件的名字 第二个参数：哪一个组件
//引入elementUI插件
import ElementUI from 'element-ui';
import Carsousel from '@/components/Carsousel'
import Pagination from '@/components/Pagination'
Vue.component(TypeNav.name,TypeNav);
Vue.component(Carsousel.name,Carsousel);
Vue.component(Pagination.name,Pagination)
Vue.component(ElementUI)
//引入MockServer.js
import "@/mock/mockServe"

import 'swiper/css/swiper.css'
//测试
/*
import {reqCategoryList} from '@/api';
reqCategoryList();
Vue.config.productionTip = false
*/
//引入统一接口
//统一接口api文件夹里面全部请求函数
import * as API from '@/api';

new Vue({

  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus=this;
    Vue.prototype.$API=API;
  },
  router,
  //注册仓库：组件实例的身上会多一个属性
  store

}).$mount('#app')
